
<html ng-app="app">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link href="../../build/common/base.css" rel="stylesheet">
	<script type="text/javascript" src="../../build/common/ngEdit-ori.js"></script>
	<script type="text/javascript" src="../../build/common/easyLayout.js"></script>
	<script type="text/javascript" src="../../assets/js/platform/form/formDef/formDefEditController.js"></script>
	<script type="text/javascript" src="../../assets/js/plugins/softable/Sortable.min.js"></script>
	<link rel="stylesheet" href="../../assets/js/plugins/jqueryui/css/base/jquery-ui-1.10.4.custom.min.css">
	<script src="../../assets/js/plugins/jqueryui/js/jquery-ui-1.10.4.custom.js"></script>

	<script type="text/javascript">
        var formType = $.getParam("formType");

        window.__ctx_mb = "http://localhost:8082";//移动端地址
        window.__ctx_pc_iview = "http://localhost:8081";//iview地址
	</script>
	<script type="text/javascript" src="../../build/common/uedtor.js"></script>
</head>
<body class="easy-layout" ng-controller="ctrl" ng-init="init()">
<div data-options="region:'west',split:true,border:true,title:'业务对象'" style="width: 180px;">
	<div id="boTree" class="ztree"></div>
</div>

<div data-options="region:'center',border:false">
	<div class="panel-heading">
		<a class="btn btn-primary fa-save" href="javascript:void(0)" ng-model="data" ab-save="/form/formDef/save">保存</a>
		<a href="javascript:void(0)" class="btn btn-primary fa-reply" onclick="javaScript:window.close()">取消</a>
		<a ng-show="data.boKey" href="javascript:void(0)" class="btn btn-primary fa-cubes" ng-click="selectTemplate()">生成表单</a>
		<a href="javascript:void(0)" ng-if="data.type!='mobile'&&data.type!='pc_iview'" class="btn btn-primary fa-eye" ng-click="preview()" ng-show="data.id">预览</a>
		<a href="javascript:void(0)" ng-if="data.type=='mobile'||data.type=='pc_iview'" class="btn btn-primary fa-eye" ng-click="preview()" ng-show="data.id" ab-tip title="当前类型的表单预览需要正确配置服务器地址，并且由于是跨域预览，请在保存后再预览" >预览</a>
		<a href="javascript:void(0)" class="btn btn-primary fa-eye" ng-click="preview(1)" ng-show="data.id" ab-tip title="请保存后再预览" >新页面预览</a>
		<a ng-if="data.isDeveloper" class="btn btn-primary fa-hand-o-up" ng-click="getBackupHtml()" ab-tip title="该行为只是获取开发者配置的备份表单信息，需要点击‘保存’也会生效" >
			同步表单备份
		</a>
	</div>
	<form name="form" ab-load="/form/formDef/getObject?id={id}" ng-model="data">
		<table class="form-table form-table-3">
			<tr>
				<th>分类</th>
				<td>
					<span style="display: block;max-width:360px" ab-combox="data.groupId" value-name="data.groupName" tree-key="bdfl" ng-model="data.groupId" ab-validate="{required:true}"></span>
				</td>
				<th>名称</th>
				<td>
					<input type="text" ng-model="data.name" class="form-control" ab-validate="{required:true,maxlength:60}" />
				</td>
				<th>别名</th>
				<td>
					<input type="text" ng-readonly="data.id" ab-pinyin="data.name" ng-model="data.key" class="form-control wd100-100" ab-validate="{required:true,varirule:true,maxlength:60}" />
				</td>
			</tr>
			<tr>
				<th>描述</th>
				<td>
					<textarea ng-model="data.desc" class="form-control" ab-validate="{maxlength:560}"></textarea>
				</td>
				<th>业务对象别名</th>
				<td class="form-inline">
					<input type="text" ng-model="data.boKey" readonly="readonly" placeholder="请选择业务对象" class="form-control wd120" ab-validate="{required:true}" />
					<a class="btn btn-primary fa-search" href="javascript:void(0)" ab-cust-dialog="busObjectSelect" value-key="data.boKey" value-name="data.boName" dialog-setting="{multiple:false}">选择</a>
				</td>
				<th class="bc-trans">业务对象名称</th>
				<td>
					<input disabled type="text" ng-model="data.boName" class="form-control" />
				</td>
			</tr>
			<tr>
				<td colspan="6" style="width: 100% !important; max-width: 100% !important;">
					<textarea ab-editor config="editorConfig" ng-model="data.html" id="form-def-edit"></textarea>
				</td>
			</tr>
		</table>
	</form>
</div>
</body>
</html>